package com.slj.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * <p>
 * 采购明细表 记录每个采购订单的具体商品信息。
 * </p>
 *
 * @author 礼俊
 * @since 2025-09-20 22:46
 */
@Getter
@Setter
@ToString
@TableName("purchase_order_details")
@Schema(name = "PurchaseOrderDetails", description = "采购明细表 记录每个采购订单的具体商品信息。")
public class PurchaseOrderDetails extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单ID
     */
    @Schema(description = "订单ID")
    @TableId(value = "order_id", type = IdType.AUTO)
    private String orderId;

    /**
     * 商品ID
     */
    @Schema(description = "商品ID")
    @TableField("product_id")
    private Integer productId;

    /**
     * 数量
     */
    @TableField("quantity")
    @Schema(description = "数量")
    private Integer quantity;

    /**
     * 单价
     */
    @TableField("unit_price")
    @Schema(description = "单价")
    private Double unitPrice;

    /**
     * 商品小计
     */
    @TableField("subtotal")
    @Schema(description = "商品小计")
    private Double subtotal;

    /**
     * 供应商ID
     */
    @TableField("supplier_id")
    @Schema(description = "供应商ID")
    private Integer supplierId;
}
